import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import service from "./utils/service"

//样式
// import "./not-used-files/theme-dark.scss";

Vue.config.productionTip = false
Vue.prototype.$axios = Object.freeze(service)

//指令插件的导入
import Loading from "./directive/loading/loading";
import Waves from "./directive/waves"
import Tips from './directive/tips/tips'
import LoadingCirc from "@/directive/loading/loading-circ";

Vue.use(Loading)
Vue.use(LoadingCirc)
Vue.use(Waves)
Vue.use(Tips)

import MetaInfo from 'vue-meta-info';

Vue.use(MetaInfo)

// 全局过滤器
import * as filters from '@/filters/dataFormat'

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])//插入过滤器名和对应方法
})

import APlayer from '@moefe/vue-aplayer';
Vue.use(APlayer, {
  defaultCover: 'https://github.com/u3u.png', // set the default cover
  productionTip: false, // disable console output
});

//lodash工具的使用
import _ from 'lodash'

Vue.prototype._ = _


import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload)
// 配置项
Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: 'https://rawchen.com/usr/themes/rawchen/images/thumbs/1.jpg',
  loading: 'https://rawchen.com/usr/themes/rawchen/images/thumbs/1.jpg',
  attempt: 1
})


import * as util from './utils'

Vue.prototype.$util = util
//全局组件
//import RightPanelContainer from '@/components/RightPanelContainer'

import i18n from './i18n'
//Vue.component('RightPanelContainer',RightPanelContainer)

new Vue({
  router,
  store,
  render: h => h(App),
  i18n,

  mounted() {
    //document.dispatchEvent(new Event('render-event'))
  }
}).$mount('#app')
